package main

import (
	"fmt"
	"io/ioutil"
	"net/http"
	"runtime"
	"testing"
)

func main() {
	//man := normal.Man{Name: "lucy"}
	//fmt.Println("=====> ", man)
	slice_multiple()
}

func slice_multiple() {
	fmt.Println("testing")
	datas := []string{"afdaf", "afafa", "13123"}
	data1 := []string{}
	data2 := []string{}
	data3 := []string{}
	data1 = append(data1, datas...)
	data2 = append(data2, datas...)
	data3 = append(data3, datas...)
	data1[1] = "abc"

	fmt.Println("=====> ", data1)
	fmt.Println("=====> ", data2)
	fmt.Println("=====> ", data3)

}

func Test_get(t *testing.T) {
	num := 6
	for index := 0; index < num; index++ {
		resp, _ := http.Get("https://www.baidu.com")
		_, _ = ioutil.ReadAll(resp.Body)
	}
	fmt.Printf("此时goroutine个数= %d\n", runtime.NumGoroutine())
}
